// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 新增安全-排查计划数据 POST /safeInspectionPlan/add */
export async function safeInspectionPlanAdd(
  body: BIZAPI.SafeInspectionPlanCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanAdd(
  body: BIZAPI.SafeInspectionPlanCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeInspectionPlanAdd(
  body: BIZAPI.SafeInspectionPlanCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanAdd(
  body: BIZAPI.SafeInspectionPlanCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/add`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除安全-排查计划数据 POST /safeInspectionPlan/delete */
export async function safeInspectionPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeInspectionPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/delete`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/delete`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取安全-排查计划数据 POST /safeInspectionPlan/get */
export async function safeInspectionPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultSafeInspectionPlanEntity>;

export async function safeInspectionPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultSafeInspectionPlanEntity>>;

export async function safeInspectionPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultSafeInspectionPlanEntity>;

export async function safeInspectionPlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultSafeInspectionPlanEntity>(
      `/app/safeInspectionPlan/get`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultSafeInspectionPlanEntity>(
    `/app/safeInspectionPlan/get`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 处理 POST /safeInspectionPlan/handle */
export async function safeInspectionPlanHandle(
  body: BIZAPI.SafeInspectionPlanHandleReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanHandle(
  body: BIZAPI.SafeInspectionPlanHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeInspectionPlanHandle(
  body: BIZAPI.SafeInspectionPlanHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanHandle(
  body: BIZAPI.SafeInspectionPlanHandleReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/handle`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/handle`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取安全-排查计划分页数据 POST /safeInspectionPlan/page */
export async function safeInspectionPlanPage(
  body: BIZAPI.SafeInspectionPlanQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageSafeInspectionPlanEntity>;

export async function safeInspectionPlanPage(
  body: BIZAPI.SafeInspectionPlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageSafeInspectionPlanEntity>>;

export async function safeInspectionPlanPage(
  body: BIZAPI.SafeInspectionPlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageSafeInspectionPlanEntity>;

export async function safeInspectionPlanPage(
  body: BIZAPI.SafeInspectionPlanQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageSafeInspectionPlanEntity>(
      `/app/safeInspectionPlan/page`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageSafeInspectionPlanEntity>(
    `/app/safeInspectionPlan/page`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 更新安全-排查计划数据 POST /safeInspectionPlan/update */
export async function safeInspectionPlanUpdate(
  body: BIZAPI.SafeInspectionPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanUpdate(
  body: BIZAPI.SafeInspectionPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeInspectionPlanUpdate(
  body: BIZAPI.SafeInspectionPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeInspectionPlanUpdate(
  body: BIZAPI.SafeInspectionPlanUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/update`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeInspectionPlan/update`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
